import request from '@/utils/request'

// 查询火车车厢列表
export function listTrainCarriage(query) {
  return request({
    url: '/base/train-carriage/list',
    method: 'get',
    params: query
  })
}

// 查询火车车厢详细
export function getTrainCarriage(id) {
  return request({
    url: '/base/train-carriage/' + id,
    method: 'get'
  })
}

// 新增火车车厢
export function addTrainCarriage(data) {
  return request({
    url: '/base/train-carriage',
    method: 'post',
    data: data
  })
}

// 修改火车车厢
export function updateTrainCarriage(data) {
  return request({
    url: '/base/train-carriage',
    method: 'put',
    data: data
  })
}

// 删除火车车厢
export function delTrainCarriage(id) {
  return request({
    url: '/base/train-carriage/' + id,
    method: 'delete'
  })
}

// 清空火车车厢
export function clearTrainCarriage(data) {
  return request({
    url: '/base/train-carriage/clear',
    method: 'post',
    data: data
  })
}
